package com.meicet.adapter.utils

import android.os.Build

// Android 13.0(T)	32
// Android 12.0(S)	31
// Android 11.0(R)	30
// Android 10.0(Q)	29
// Android 9.0(Pie)	28
// Android 8.1(Oreo)	27
// Android 8.0(Oreo)	26
// Android 7.1(Nougat)	25
// Android 7.0(Nougat)	24
// Android 6.0(Marshmallow)	23
// Android 5.1(Lollipop)	22
// Android 5.0(Lollipop)	21

// 12.1  = 32
fun buildMinVersionSv2(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S_V2
fun android12Sv2Api32Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S_V2

// 12.0  = 31
fun buildMinVersionS(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
fun android12SApi31Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S

// 11.0  = 30
fun buildMinVersionR(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
fun android11RApi30Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R

// 10.0  = 29
fun buildMinVersionQ(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
fun android10QApi29Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q

// 9.0  = 28
fun buildMinVersionP(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
fun buildVersionP(): Boolean = Build.VERSION.SDK_INT == Build.VERSION_CODES.P
fun android9PApi28Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
fun android9PApi28Build(): Boolean = Build.VERSION.SDK_INT == Build.VERSION_CODES.P

// 8.1  = 27
fun buildMinVersionO1(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1
fun android8Omr1Api27Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1

// 8.0 = 26
fun buildMinVersionO(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
fun android8OApi26Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O

// 7.1 = 25
fun buildMinVersionNmr1(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1
fun android7Nmr1Api25Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1

// 7.0 = 24
fun buildMinVersionN(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
fun android7NApi24Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N

// 6.0 = 23
fun buildMinVersionM(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
fun android6MApi23Min(): Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
